package org.daidai.abstrusewriting.homepage.classify.model;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

/**
 * Created by Administrator on 2016/10/31.
 */

public class ClassifyItem  implements Parcelable{
    @SerializedName("id")
    private long id;
    @SerializedName("title")
    private String title;
    @SerializedName("coverPath")
    private String coverPath;

    public ClassifyItem() {
    }

    protected ClassifyItem(Parcel in) {
        id = in.readLong();
        title = in.readString();
        coverPath = in.readString();
    }

    public static final Creator<ClassifyItem> CREATOR = new Creator<ClassifyItem>() {
        @Override
        public ClassifyItem createFromParcel(Parcel in) {
            return new ClassifyItem(in);
        }

        @Override
        public ClassifyItem[] newArray(int size) {
            return new ClassifyItem[size];
        }
    };

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getCoverPath() {
        return coverPath;
    }

    public void setCoverPath(String coverPath) {
        this.coverPath = coverPath;
    }

    @Override
    public String toString() {
        return "ClassifyItem{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", coverPath='" + coverPath + '\'' +
                '}';
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(id);
        dest.writeString(title);
        dest.writeString(coverPath);
    }
}
